import Vue from 'vue'
import vueRouter from 'vue-router'
import Home from '@/components/Home'

/*tabbar下的组件*/

import selected from '@/components/selected/selected'
import forum from '@/components/forum/forum'
import mine from '@/components/mine/mine'
import liquorType from '@/components/liquorType'

/*Home子组件*/
import searchList from '@/components/search/searchList'
import shopDetails from '@/components/shopDetails'
import goodsDetails from '@/components/goodsDetails'


/*message组件*/
import message from '@/components/message'
import systemMessage from '@/components/message/systemMessage'
import privateLetter from '@/components/message/privateLetter'
import forumReply from '@/components/message/forumReply'
Vue.use(vueRouter)
let router =new vueRouter({
    mode:'history',
    routes:[
        {
            path:'/home',
            name:'Home',
            component:Home,
        },
        {
            path:'/searchlist',
            name:'searchList',
            component:searchList
        },
        {
            path:'/selected',
            name:'selected',
            component:selected
        },
        {
            path:'/forum',
            name:'forum',
            component:forum
        },
        {
            path:'/mine',
            name:'mine',
            component:mine
        },
        {
            path:'/message',
            name:'message',
            component:message,
            
        },
        {
            path:'/systemMessage',
            name:'systemMessage',
            component:systemMessage,
        },
        {
            path:'/privateLetter',
            name:'privateLetter',
            component:privateLetter,
        },
        {
            path:'/forumReply',
            name:'forumReply',
            component:forumReply,
        },
        {
            path:'/shopDetails',
            name:'shopDetails',
            component:shopDetails,
        },
        {
            path:'/liquorType/:id',
            name:'liquorType',
            component:liquorType,
        },
        {
            path:'/goodsDetails',
            name:'goodsDetails',
            component:goodsDetails,
        },
        {
            path: '*',
            redirect:'/home'
        }
    ]
})
export default router
